home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-01-12 | 1.6 KB | 46 lines | [TEXT/ToyS] |
- set aList to [¬
- " Last Name", " Middle Name", " First Name", ¬
- " Personal Title", " Business Name", " Business Street", ¬
- " Business City", " Business County", " Business Postal Code", ¬
- " Business Title", " Home Street", " Home City", " Home County", ¬
- " Home Postal Code", " Notes", " Phone Type", " Phone Number", ¬
- " EMail Address", " Country"]
-
- set listDialog to {size:[280, 166], name:"Check List", style:movable dialog, contents:[¬
- {class:push button, name:"OK", bounds:[210, 136, 270, 156], enabled:false}, ¬
- {class:push button, name:"Cancel", bounds:[210, 104, 270, 124]}, ¬
- {class:list box, contents:aList, bounds:[10, 26, 190, 156], column widths:[15, 200], action:99}, ¬
- {class:static text, contents:"Double click some items:", bounds:[8, 4, 270, 20]} ¬
- ]}
-
- dd install with grayscale
- set d to dd make dialog listDialog
- set checkCount to 0
- repeat
- set i to dd interact with user
- if i = 99 then -- Double clicked list
- set x to dd get value of item 3 of d
- set s to item x of aList
- if character 1 of s = tab then
- set item x of aList to "" & s
- set checkCount to checkCount + 1
- else
- set item x of aList to text 2 thru -1 of s
- set checkCount to checkCount - 1
- end if
- dd set contents of item 3 of d to aList
- dd set value of item 3 of d to x
- dd set enabled of item 1 of d to (checkCount ≠ 0)
- else if i = 1 or i = 2 then
- exit repeat
- end if
- end repeat
- dd uninstall
-
- if i = 1 then
- set checkList to []
- repeat with i from 1 to aList's length
- if aList's item i's character 1 ≠ tab then set checkList to checkList & i
- end repeat
- return checkList
- end if